using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;

namespace DD.Pages
{
    public partial class DisplayImage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int pid= Convert.ToInt32(Request["PID"]);
            int width = Convert.ToInt32(Request["W"]);
            int height = Convert.ToInt32(Request["H"]);

            Bitmap bmp = DD.Imaging.ImageManager.GetDisplayImage(pid, width, height);
            
            //System.Drawing.Image i = DD.Imaging.ImageManager.GetDisplayImage(pid, width, height);
            Response.ContentType = "image/jpeg";
            bmp.Save(Response.OutputStream,System.Drawing.Imaging.ImageFormat.Jpeg);
        }
    }
}
